/*——--------------函数：从文件读取桌子信息——————————————————*/
int load_table(table list[])
{
    int i = 0; /*总桌子数量*/
    FILE *fp;
    if ((fp = fopen("tables.data", "r")) == NULL)
    {
        printf("Can't open the file 'tables.data'!");
        exit(0);
    }
    while (!feof(fp))
    {
        fscanf(fp, "%s", list[i].id);
        fscanf(fp, "%d", &list[i].capacity);
        list[i].free = 1;
        i++;
    }
    fclose(fp);
    return (i); /*返回桌子总数量*/
}